//https://leetcode.cn/problems/isomorphic-strings/?envType=study-plan-v2&envId=top-interview-150
#include<string>
#include<array>
#include<iostream>
using namespace std;
class Solution {
public:
    bool isIsomorphic(string s, string t) {
        if (s.size() != t.size())return false;
        array<int, 26> Map;
        Map.fill(-1);
        for (int i = 0; i < s.size(); i++) {
            int tmpS = s[i] - 'a', tmpT = t[i] - 'a';


            if (Map[tmpS] != -1 && Map[tmpS] != tmpT)return false;


            Map[tmpS] = tmpT;
            

        }
        return true;
    }
};

int main()
{
    Solution s;
    s.isIsomorphic("paper", "title");
    return 0;
}